package com.desaysv.hicar.http;

import android.content.Context;
import android.util.Log;

import com.desaysv.svhttp.callback.IBaseCallBack;
import com.desaysv.svhttp.coder.IResponseDecoder;
import com.desaysv.svhttp.handler.IHandler;
import com.desaysv.svhttp.handler.type.HttpType;
import com.desaysv.svhttp.interceptor.IInterceptor;
import com.desaysv.svhttp.param.HttpParams;

/**
 * @author linzi
 * @date 2022-9-14
 */
public class TestHandler implements IHandler<TestHandler> {
    private static final String TAG = "TestHandler";
    private String baseUrl="";
    @Override
    public TestHandler baseUrl(String url) {
        baseUrl=url;
        return this;
    }

    @Override
    public TestHandler setInterceptor(IInterceptor context) {
        return this;
    }

    @Override
    public TestHandler responseDecoder(IResponseDecoder decoder) {
        return this;
    }

    @Override
    public void request(HttpType type, String url, HttpParams params, IBaseCallBack callBack) {
        Log.e(TAG, "request: "+type.name());
        Log.e(TAG, "url: "+url);
        Log.e(TAG, "host: "+baseUrl);
    }
}
